<?php

namespace CMBUBank\UBank\Request\TransManager;

use CMBUBank\UBank\Request\UBankBaseRequest;
use CMBUBank\UBank\Response\TransManager\TransManagerSubunitPDFCreateResponse;
use CMBUBank\UBank\Response\TransManager\TransManagerSubunitTodayTradeResponse;

class TransManagerSubunitPDFCreateRequest extends UBankBaseRequest
{
    protected $code = 'NTDMTQRYPDF';

    protected $response = TransManagerSubunitPDFCreateResponse::class;

    protected $logTip = '记账子单元交易明细对账单获取';

    private $backNo;

    private $account;

    private $subCode;

    private $beginData;

    private $endData;

    private $page;

    public function generate(): array
    {
        return [
            'ntdmtqryy1' => [[
                'bbknbr' => $this->backNo,
                'inbacc' => $this->account,
                'dyanbr' => $this->subCode,
                'begdat' => date('Ymd',strtotime($this->beginData)),
                'enddat' => date('Ymd',strtotime($this->endData)),
                'ctnkey' => $this->page,
            ]],
        ];
    }

    public function setBackNo(string $backNo): void
    {
        $this->backNo = $backNo;
    }

    public function setAccount(string $account): void
    {
        $this->account = $account;
    }

    public function setSubCode(string $subCode): void
    {
        $this->subCode = $subCode;
    }

    public function setBeginData(string $beginData): void
    {
        $this->beginData = $beginData;
    }

    public function setEndData(string $endData): void
    {
        $this->endData = $endData;
    }

    public function setPage(string $page): void
    {
        $this->page = $page;
    }


}